<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <div id="app">
        <!--一个watcher要对应多个dep  ;  v-html中有obj msg text-->
        <span v-html="obj.msg.text" damu="damu" dy="dy"></span>
        <!--一个dep也可以对应多个watcher ; v-html中有obj {{}}中也有obj-->
        <i>{{obj.msg.text2}}</i>
    </div>
</body>
<script src="./MVVM/mvvm.js"></script>
<script src="./MVVM/observer.js"></script>
<script src="./MVVM/compile.js"></script>
<script src="./MVVM/watcher.js"></script>
<script>
    var vm = new MVVM({
        el:"#app",
        data: {
            //数据描述符
            obj:{
                msg:{
                    text2:"hello world2",
                    text:"hello world"
                }
            }
        }
    })

    setTimeout(()=>{
        vm.obj.msg.text = "hello Kitty"
    },2000)
</script>
</html>